import { get, post, download } from '@/utils/request'

export default class OnlinePageController {
  static list(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/list`, params)
  }

  static listAllPageAndForm(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/listAllPageAndForm`, params)
  }

  static view(params) {
    return get(`/service-workflow/b/form/onlinePage/v1/view`, params)
  }

  static export(params, fileName) {
    return download(`/service-workflow/b/form/onlinePage/v1/export`, params, fileName)
  }

  static add(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/add`, params)
  }

  static update(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/update`, params)
  }

  static updatePublished(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/updatePublished`, params)
  }

  static delete(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/delete`, params)
  }

  static updateStatus(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/updateStatus`, params)
  }

  static listOnlinePageDatasource(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/listOnlinePageDatasource`, params)
  }

  static listNotInOnlinePageDatasource(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/listNotInOnlinePageDatasource`, params)
  }

  static addOnlinePageDatasource(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/addOnlinePageDatasource`, params)
  }

  static deleteOnlinePageDatasource(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/deleteOnlinePageDatasource`, params)
  }

  static updateOnlinePageDatasource(params) {
    return post(`/service-workflow/b/form/onlinePage/v1/updateOnlinePageDatasource`, params)
  }

  static viewOnlinePageDatasource(params) {
    return get(`/service-workflow/b/form/onlinePage/v1/viewOnlinePageDatasource`, params)
  }
}
